import {createRouter, createWebHistory} from 'vue-router'
import login from '../views/login.vue'
import Home from '../views/home.vue'
import Event from '../views/event/index.vue'
import People from '../views/people/index.vue'
import Spouse from '../views/spouse/index.vue'
import Tree from '../views/tree/tree.vue'
import Picture from '../views/picture/index.vue'

const routes = [{
    path:'/',
    component:login,
},{
    path:'/login',
    component:login,
},{
    path: '/home',
    component: Home,
    children:[{
        path:'/event',
        component:Event
    },{
        path:'/people',
        component:People
    },{
        path:'/spouse',
        component:Spouse
    },{
        path:'/tree',
        component:Tree
    },{
        path:'/index',
        component:Picture
    }]
}]

const router = createRouter({
    history:createWebHistory(),
    routes
})


export default router
